<!--_meta 作为公共模版分离出去-->
{include file="public/_meta"}

<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 消息管理 <span class="c-gray en">&gt;</span>可发消息列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
    <form action="" method="get">
        <div class="text-c">
            <input type="text" class="input-text" style="width:250px" placeholder="请输入用户名、姓名、电话" id="" name="keywords">
            <button type="submit" class="btn btn-success radius" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜用户</button>
        </div>
    </form>
    <div class="cl pd-5 bg-1 bk-gray mt-20">
        <span class="l">
            <a title="群发消息" href="javascript:;" onclick="add_information_mass('群发消息','{:url(\'information/send_information_mass\')}','','800','400')" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe603;</i> 群发消息</a>
        </span>
        <span class="r">共有数据：<strong>{$count}</strong> 条</span> </div>
    <div class="mt-20">
        <table class="table table-border table-bordered table-hover table-bg table-sort">
            <thead>
            <tr class="text-c">
                <th width="25"><input type="checkbox" name="" value=""></th>
                <th >ID</th>
                <th >用户名</th>
                <th >手机</th>
                <th >注册时间</th>
                <th >操作</th>
            </tr>
            </thead>
            <tbody>
            {volist name="information" id="vo"}
            <tr class="text-c">
                <td><input class="checkbox" type="checkbox" value="{$vo.id}" name="id[]"></td>
                <td>{$vo.id}</td>
                <td>{if condition="$vo.username eq null"}暂无填写{else/}<a href="javascript:void(0);" style="cursor:pointer" class="text-primary" onclick="member_show('{$vo.username}','{:url(\'member/member_show\')}?id={$vo.id}','{$vo.id}','500','450')"><u><b>{$vo.username}</b></u></a>{/if}</td>
                <td>{$vo.tel}</td>
                <td>{$vo.ctime|date="Y-m-d H:i:s",###}</td>
                <td class="td-manage">
                <a title="发送推送消息" href="javascript:;"onclick="send_information('发送推送消息','{:url(\'information/send_information\')}?id={$vo.id}','{$vo.id}','800','400')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe603;</i></a>
                </td>
            {/volist}
            </tbody>
        </table>
    </div>
</div>

<!--_footer 作为公共模版分离出去-->
{include file="public/_footer"}

<script type="text/javascript">
    $(function(){
        $('.table-sort').dataTable({
            "aaSorting": [[ 1, "asc" ]],//默认第几个排序
            "bStateSave": true,//状态保存
            "aoColumnDefs": [
                //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
                {"orderable":false,"aTargets":[0,5]}// 制定列不参与排序
            ]
        });

    });

    /*发送消息*/
    function send_information(title,url,id,w,h){
        layer_show(title,url,w,h);
    }
    /*群发消息*/
    function add_information_mass(title,url,id,w,h){
        layer_show(title,url,w,h);
    }
    /*群发学生消息*/
    function add_student_information_mass(title,url,id,w,h){
        layer_show(title,url,w,h);
    }
    /*群发教师消息*/
    function add_teacher_information_mass(title,url,id,w,h){
        layer_show(title,url,w,h);
    }
    /*用户-查看*/
    function member_show(title,url,id,w,h){
        layer_show(title,url,w,h);
    }
</script>
